import { memo } from "react";
import { View, Text, Image } from "@tarojs/components";
import SearchIcon from "@/assets/images/category/cate-search.png";
import styles from "./index.module.scss";

import type { ITouchEvent } from "@tarojs/components/types";

const CategorySearch = () => {
  function handleItemClick(e: ITouchEvent) {
    console.log(e);
  }

  return (
    <View
      className={styles["category-search"]}
      onClick={(e) => handleItemClick(e)}
    >
      <Image className={styles["search-icon"]} src={SearchIcon} />
      <Text className={styles.name}>搜索商品</Text>
    </View>
  );
};

export default memo(CategorySearch);
